<h1>Listing Timeline Events</h1>

        <div class="nav">
            <span class="menuButton">
                 <%= link_to "Create", :controller => "timeline_events",  :action => "new",:class => "create" %>
            </span>
        </div>
        <div class="body">
            <h1>Timeline List</h1>
            <% if flash[:message] %><%=flash[:message]%><%end%>
            <div class="list">

                <table>
                    <thead>
                        <tr>
                          <td>Id</td>
                           <td>Title</td>
                           <td>Actions</td>

                        </tr>
                    </thead>
                    <tbody>

                      <% timeline_event_counter=0 %>
                      <% @timeline_events.each do |timeline_event| %>

                               <% timeline_event_counter=timeline_event_counter+1 %>
                                <tr class=<%= ( timeline_event_counter.modulo(2))==0 ? "even" : "odd" %> >
                                  <td><%= timeline_event.id %></td>
                                  <td><%= timeline_event.title %></td>
                                  <td><%= link_to "Show",:controller=>"timeline_events", :action=>"show", :id => timeline_event.id%>

                                  <%= link_to "Edit",:controller=>"timeline_events", :action=>"edit", :id => timeline_event.id%>
                                  <%= link_to "Delete",:controller=>"timeline_events", :action=>"destroy", :id => timeline_event.id %>
                                  </td>
                                </tr>
                     <% end %>
                    </tbody>
                </table>
            </div>
               <div class="paginateButtons">
                <%= will_paginate @timeline_events %>
            </div>
             
        </div>

  <%= link_to 'New timeline event', new_memorylane_timeline_event_path %>

<%= link_to "List As Json",:controller=>"timeline_events", :action=>"list", :id => @memorylane.id %>
